const { sequelize } = require('../config/db');
const { DataTypes } = require('sequelize');

const reportsModels = sequelize.define('reports', {
  id: {
    type: DataTypes.INTEGER,
    primaryKey: true,
    autoIncrement: true
  },
  name: {
    type: DataTypes.STRING,
    allowNull: false //代表约束这个数据不能为空
  },
  categoryId: {
    type: DataTypes.INTEGER,
    allowNull: false
  },
  hospital: {
    type: DataTypes.STRING,
    allowNull: false
  },
  checkDate: {
    type: DataTypes.STRING,
    allowNull: false
  },
  reportDate: {
    type: DataTypes.STRING,
    allowNull: false
  },
  status: {
    type: DataTypes.STRING,
    allowNull: false
  },
  
},

  {
    tableName: 'reports',
    timestamps: true,
    indexes: []
  })

module.exports = { reportsModels };